home *** CD-ROM | disk | FTP | other *** search
- Robert, looks like you'll have to use a Collision / Zone combo
- to detect a collision within a Limit Bob defined area. Try This:
-
- Ink 3 : Bar 0,0 To 20,20
- Reserve Zone 1
- Get Bob 1,0,0 To 20,20
- Box 0,50 To 64,90
- Wait Vbl
- Limit Bob 1,0,50 To 64,90
- Set Zone 1,0,50 To 64,90
- Do
- X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
- Bob 2,X,Y,1
- Wait Vbl
- If Zone(X,Y)
- If Bob Col(2)
- Boom
- End If
- End If
- Loop
-
- -----Original Message-----
- From: Robert W. Benjamin [SMTP:sosbbs.com@mail1.access.digex.net]
- Sent: Friday, June 27, 1997 1:45 AM
- To: Amos List
- Subject: The Unseen Bob
-
- I am working on an AMOS project, a simple shooter for the AMIGA Public
- Domain.
- While coding the game, I have run into a problem:
- I have a scene where an enemy slides up and comes into view in a window
- of a building. The enemy is on the screen all the time, but I have set
- it's
- 'BOB LIMIT' to the size of the window, so the only time you see the
- enemy
- is when it slides up into the 'BOB LIMIT' view area.
-
- The problem is, if i want another 'BOB' to detect a collision with
- the 'BOB'
- in the window, it detects a collision with the 'BOB' even if it's
- under the
- window (NOT IN THE 'BOB LIMIT' AREA). The 'BOB' does'nt even have
- to be visible on the screen (IN THE 'BOB LIMIT' AREA), to detect a
- collision.
-
- Why does it detect a collision, with a part that's not being drawed on the
- screen?
- is it because collisions are based on the X and Y positions? Or because AMOS
- looks at the size of the 'BOB' images in the .abk 'BOB' bank to check for
- collisions?
-
- Robert W. Benjamin
- rwbenjamin@sosbbs.com
-
-
-